refactor(blender): stabilize naming synchronization and decouple translator architecture#242
Merged
Merged
Conversation
…itecture - Implemented two-tier deferred renaming (timers for GUI, queue for background). - Decoupled platform adapters into a registry-based Translator pattern. - Resolved asynchronous naming inconsistencies and race conditions in CI/CD. - Professionalized error handling and type safety across blender platform. - Maintained 100% test pass rate across 170+ unit and integration tests. Signed-off-by: arounamounchili <patouossa.mounchili@gmail.com>
- Fix NoneType errors in view_layer access during headless tests\n- Stabilize MockCollection (hashability) and MockTimers (re-scheduling) for async operators\n- Cleanup temporary debug prints and optimize imports across the Blender platform\n- Resolve linting issues (duplicated keys, shadowed builtins, contextlib.suppress) Signed-off-by: arounamounchili <patouossa.mounchili@gmail.com>
…tion - Centralize mock_bpy_env.py to tests/ root for unified mocking. - Implement high-fidelity operator mocks (add_empty_link) to ensure scene population. - Fix NoneType errors in physics, sensors, and converter robustness tests. - Remove temporary debug prints and standardize defensive assertions. - Ensure 100% test pass rate in both headless and real Blender environments. Signed-off-by: arounamounchili <patouossa.mounchili@gmail.com>
…ffness/damping Signed-off-by: arounamounchili <patouossa.mounchili@gmail.com>
…perties architecture - Merged SimulationProperties into LinkPhysics core model.\n- Centralized physics constants (kp, kd, mu) in linkforge_core.constants.\n- Optimized dict_utils with Type Overloads for better Blender/Core compatibility.\n- Expanded safety net with new unit tests for all refactored logic.\n- Cleaned up dead code and stale TYPE_CHECKING blocks. Signed-off-by: arounamounchili <patouossa.mounchili@gmail.com>
- Merged redundant simulation properties into LinkPhysics dataclass. - Implemented scientific notation proxies for kp/kd in Blender UI. - Fixed type-inference issues in test suite for XACRO/URDF parsers. - Added full round-trip tests for physics properties in Blender adapters. - Renamed LinkBuilder.simulation to physics for architectural alignment. - Sanitized codebase by removing dead code and unused imports. Signed-off-by: arounamounchili <patouossa.mounchili@gmail.com>
…e integration tests - Implemented a Registry-based Translator pattern (ITranslator) for specialized component handling. - Decoupled physical, mechanical, and control layers into dedicated Translators (Link, Joint, Sensor, Transmission, Ros2Control). - Purged legacy shims, diagnostic prints, and dead code from the adapter layer. - Fixed a critical 'MagicMock' leakage issue in integration tests by correcting property access in Ros2ControlTranslator. - Standardized ROS 2 control property mapping to use 'hardware_plugin' per the core model specification. - Achieved 100% test coverage for the new architecture with 58 unit tests and 16 integration tests. - Sanitized imports and applied professional formatting across the adapter and test suites. Signed-off-by: arounamounchili <patouossa.mounchili@gmail.com>
- centralize physics safety limits in constants.py - synchronize XML parsing with high-performance float bounds - implement conditional Gazebo tag generation in URDFGenerator - refactor Blender-to-Core translation for smarter Gazebo plugin handling - ensure Gazebo ROS2 Control plugin is only generated when joints are present - fix integration test regressions with robust mesh data extraction - improve RobotValidationError reporting in Blender adapter Signed-off-by: arounamounchili <patouossa.mounchili@gmail.com>
…logic - enforce STL format for collision meshes regardless of global preferences to ensure simulator compatibility - implement smart "Advanced Simulation" toggle in importer: only enable if physics are modified or plugins exist - restore missing physics fields (mu2, self_collide, gravity) during Core-to-Blender import - fix logic error in Gazebo plugin generation by referencing active hardware interfaces - verify all changes with a comprehensive unit and integration test suite - ensure professional code quality with Ruff formatting and MyPy type checking Signed-off-by: arounamounchili <patouossa.mounchili@gmail.com>
…nd frozen dataclasses - Converted Transmission and Ros2Control models to frozen dataclasses - Enforced internal tuple storage for all core collections (links, joints, interfaces) - Added update_ros2_control method to Robot model for professional state management - Updated LinkBuilder to use functional replaces instead of illegal mutations - Standardized on Sequence type hints and collections.abc imports - Cleaned up dead legacy code (HardwareInterface enum) - Updated test suite for strict structural compliance Signed-off-by: arounamounchili <patouossa.mounchili@gmail.com>
Signed-off-by: arounamounchili <patouossa.mounchili@gmail.com>
- Refactor _finalize_xml in xacro_parser.py to use namespace-aware filtering - Centralize XACRO URIs and prefixes in constants.py - Implement defensive assertions in test_xacro.py to prevent NoneType errors - Fix Sequence concatenation type errors in robot and generator tests - Clean up xml_utils.py namespace registration - Verified with 805 tests, ruff, and mypy Signed-off-by: arounamounchili <patouossa.mounchili@gmail.com>
- Update urdf_parser.py and srdf_parser.py to import XACRO_URIS from constants - Fix mypy 'attr-defined' errors after centralizing constants Signed-off-by: arounamounchili <patouossa.mounchili@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📝 Description
This PR stabilizes the LinkForge Blender platform by implementing a robust asynchronous naming synchronization system and refactoring the scene translation logic into a decoupled, registry-based architecture.
🛠️ Type of change
✅ Checklist
uv run pytestand all tests passuv run pre-commit run --all-filesand all hooks pass